package com.zfl.practice;

import com.zfl.thread.day05.AtomicIntegerArrayDemo01;

import java.util.concurrent.atomic.AtomicIntegerArray;

public class AtomicDemo01 {
    public static void main(String[] args) {

        AtomicIntegerArray atomicIntegerArray = new AtomicIntegerArray(new int[]{1,2,3,4,5});
        System.out.println("atomicIntegerArray = " + atomicIntegerArray);
        atomicIntegerArray.compareAndSet(1,23,20);
        System.out.println("atomicIntegerArray = " + atomicIntegerArray);
    }


}
